import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/sjzl'
        },
        {
            path: '/',
            component: () =>
                import('../components/Home.vue'),
            meta: { title: '首页' },
            children: [
                {
                    path: '/sjzl',
                    component: () =>
                        import('../page/title/SJZL'),
                    meta: { title: '数据总览' }
                },
                {
                    path: '/zzzh',
                    component: () =>
                        import('../page/title/ZZZH.vue'),
                    meta: { title: '作战智慧' }
                },
                {
                    path: '/znsl',
                    component: () =>
                        import('../page/title/ZNSL.vue'),
                    meta: { title: '智能收料' }
                },
                {
                    path: '/lcgl',
                    component: () =>
                        import('../page/title/LCGL.vue'),
                    meta: { title: '料仓管理' }
                },
                {
                    path: '/cldd',
                    component: () =>
                        import('../page/title/CLDD.vue'),
                    meta: { title: '车辆调度' }
                },
                {
                    path: '/spjk',
                    component: () =>
                        import('../page/title/SPJK.vue'),
                    meta: { title: '视频监控' }
                },
                {
                    path: '/ycjc',
                    component: () =>
                        import('../page/title/YCJC.vue'),
                    meta: { title: '扬尘监测' }
                }
            ]
        },
        {
            path: '/login',
            component: () =>
                import('../page/Login.vue'),
            meta: { title: '登录' }
        }
    ],
    mode: 'hash'
});